package edu.whut.mall.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import edu.whut.mall.common.vo.Page;
import edu.whut.mall.user.model.Address;
import edu.whut.mall.user.vo.AddressVo;

/**
 * @author Dary
 * @projectName mall-refactor
 * @date 2021/6/28 16:28
 */
public interface IAddressService {
    //获取一条收货地址
    AddressVo getOneUserAddress(int uaId, int userId) throws Exception;
    //新增一条收货地址
    AddressVo addOneUserAddress(int userId, int areaCode, String address, String realName, String phone) throws Exception;
    //编辑一条收货地址
    AddressVo updateOneUserAddress(int id,int userId, Integer areaCode, String address, String realName, String phone) throws Exception;
    //删除一条收货地址
    Boolean deleteOneUserAddress(int uaId, int userId) throws Exception;
    //把一条收获地址设置为默认收货地址
    Boolean updateOneUserAddressAsDefault(int uaId,int userId)throws Exception;
    //获取收货地址分页列表
    Page<AddressVo> getUserAddressPageList(int current, int size, int userId, String address, String orderBy, Boolean asc);

}
